package sig.util;

import java.io.File;

import sig.dao.relational.IDaoBusinessPartner;
import sig.dao.relational.IDaoEmployee;
import sig.dao.relational.IDaoUser;
import sig.model.entities.BusinessPartner;
import sig.model.entities.Employee;
import sig.model.entities.JournalEntry;
import sig.model.entities.SigUser;

public class Services implements IServices {

	private IDaoEmployee daoEmployee;
	private IDaoBusinessPartner daoBusinessPartner;
	private IDaoUser daoUser;

	@Override
	public void saveEmployee(Employee employee) {

		daoEmployee.save(employee);

	}

	public IDaoEmployee getDaoEmployee() {
		return daoEmployee;
	}

	public void setDaoEmployee(IDaoEmployee daoEmployee) {
		this.daoEmployee = daoEmployee;
	}

	@Override
	public void saveBusinessPartner(BusinessPartner businessPartner) {
		daoBusinessPartner.save(businessPartner);
	}

	public IDaoBusinessPartner getDaoBusinessPartner() {
		return daoBusinessPartner;
	}

	public void setDaoBusinessPartner(IDaoBusinessPartner daoBusinessPartner) {
		this.daoBusinessPartner = daoBusinessPartner;
	}

	@Override
	public void updateEmployee(Employee employee) {
		// TODO Auto-generated method stub

	}

	@Override
	public void updateBusinessPartner(BusinessPartner businessPartner) {
		// TODO Auto-generated method stub

	}

	@Override
	public void saveUser(SigUser user) {
		daoUser.save(user);

	}

	@Override
	public void updateUser(SigUser user) {
		// TODO Auto-generated method stub

	}

	@Override
	public void addJournalEntry(JournalEntry journalEntry) {
		// TODO Auto-generated method stub

	}

	public IDaoUser getDaoUser() {
		return daoUser;
	}

	public void setDaoUser(IDaoUser daoUser) {
		this.daoUser = daoUser;
	}

	@Override
	public void uploadConsultantFile(File file) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public SigUser authenticate(String login, String password) {
		
		return daoUser.login(login, password);
	}

}
